#ifndef DRAWABLE_H
#define DRAWABLE_H

#include <SFML/Graphics.hpp>
#include <boost/shared_ptr.hpp>
#include <Box2D/Box2D.h>

class drawable
{
public:
	drawable() : m_rotation(0), m_scale(1) { m_position.x=0; m_position.y=0; }
	virtual ~drawable( ) { }
	virtual bool draw( sf::RenderWindow * renderWindow, float x = 0, float y = 0, float rotation = 0, float scale = 1 ) = 0;
	bool draw( sf::RenderWindow * renderWindow, b2Vec2 position, float rotation = 0, float scale = 1 )
	{
		return draw( renderWindow, position.x, position.y, rotation, scale );
	}
	virtual void update( float delta_time ) {  }
	virtual void reset() { }

	void set_x(float x) {m_position.x=x;}
	void set_y(float y) {m_position.y=y;}
	void move_to( float x, float y ) {m_position.x=x; m_position.y=y;}
	void move_to( b2Vec2 position ) { m_position = position; }

protected:
	b2Vec2 m_position;
	float m_rotation;
	float m_scale;
};

typedef boost::shared_ptr< drawable > drawable_ptr;

#endif
